//
//  SEGBasicBussinessCommonDefine.h
//  SEGBasicBussiness
//
//  Created by 刘山 on 2018/3/21.
//  Copyright © 2018年 刘山. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SEGAnalyseBehaviorDefine.h"

//#define kMenuActionTabSHARE @"TAB_SHARE"
//#define kMenuActionTabSERVICE @"TAB_SERVICE"
//#define kMenuActionTabDOOR @"TAB_DOOR"
//#define kMenuActionTabMESSAGE @"TAB_MESSAGE"
//#define kMenuActionTabME @"TAB_ME"
/**
 偏好设置：升级弹窗-点击按钮跳转URL
 */
#define kSEGUserDefaultsAppStoreURL @"SEGUserDefaultsAppStoreURL"

//是否为发布环境key
#define kUserDefaultIsProduction @"SEGUserDefaultIsProduction"

//启动图展示标示：YES 展示，NO 隐藏
#define kUserDefaultShowLaunchImageName @"SEGUserDefaultShowLaunchImageName"

//启动广告本地缓存key值，值：YES 调用启动广告方法，值：NO 不调用
#define kUserDefaultLaunchAdvertisement @"SEGUserDefaultLaunchAdvertisement"
//新特性检查key
#define kUserDefaultShowNewVersion @"SEGUserDefaultShowNewVersion"
//上个版本的版本号key-用于判断是否请求产品升级积分
#define kUserDefaultLastVersionCode @"UserDefaultLastVersionCode"
//是否从后台进入前台、是否从app启动进入
#define kUserDefaultApplicationEnter @"SEGUserDefaultApplicationEnter"
#define kApplicationEnterNotification @"SEGApplicationEnterNotification"

#define kMarketCode @"market_type"
#define kIdle @"出售中"
#define kSaleOut @"已出手"

#define kLoginMessage @"请登录后再试。"

#define  SELECTPHOTOMAX    3           //取相片

//广告播放时间
#define AD_PAGE_COUNT 3

#define kTimeFormatStringMin @"yyyy-MM-dd HH:mm"
#define kTimeFormatStringSec @"yyyy-MM-dd HH:mm:ss"
#define kTimeFormatStringDay @"yyyy/MM/dd"
#define kTimeFormatStringMonth @"yyyy-MM-dd"
#define kTimeFormatStringTime @"HH:mm"

#define MoneyRateChange (double)(0.01)

#define kDebug [SEGBasicBussinessCommonDefine segDebug]

#pragma mark - 积分系统点击的业务逻辑
/*====================积分系统点击的业务逻辑=========================*/
//========== 下面不是积分 ==========
//升级
#define SEGIntegralCode_LEVEL_UPGRADE @"upgrade"
//降级
#define SEGIntegralCode_LEVEL_DOWNGRADE @"downgrade" //跳转到帮助中心
#define SEGIntegralCode_PUSH_TYPE_TELEPHONE_FARE @"exChangeRecord" //跳转到兑换记录

#pragma mark - 全局字符串
/*===========================全局字符串============================*/
#define kNetworkErrorMessage @"网络不太好，请稍后继续"
#define kActionHOUSE_CERTIFICATION @"cn.segi.uhome.action.HOUSE_CERTIFICATION"

// 常用菜单action
#define kActionCOMMON_MENULIST @"cn.segi.uhome.action.COMMON_MENULIST"
// 常用菜单刷新通知
#define kNotificationCOMMON_MENULIST @"kNotificationCOMMON_MENULIST"

#define kNetworkNoDataDefaultMessage @"这里什么都没有"//网络请求返回数据异常提示
#define kLoadFailDefaultMessage @"加载失败" //加载失败提示

#define kPay @"支付"
#define kConfirm @"确定"
#define kCancel @"取消"
#define kBack @"返回"
#define kNeedBillDesc @"如需发票，请到物业中心领取"
#define kTestContent @"测试"
#define kTestNumber @"1000"

#define kIntegarlTitleDesc @"分享成功"
#define kIntegarlPublishDesc @"发布成功"
#define kIntegarlProfileDesc @"完善资料"
#define kIntegarlOpenDesc @"开门成功"

#define kOpenDoorMessage_Opening @"正在开门哦 请等一下下..."
#define kOpenDoorMessage_Success @"开门成功"
#define kOpenDoorMessage_Failed @"开门失败，靠近一点再试一下吧，亲！"
#define kOpenDoorMessage_Failed_Common @"啊哦~您开门失败了哦 ,  多试几次吧！"
#define kOpenDoorMessage_Unsupport @"暂不支持此类门禁哦!"
#define KnoDoorsMesssage @"这儿什么门都没有"

#define KDetectScreenShotTipMessage @"检测到被截屏，请确认是否是本人操作！"
#define KDetectScreenCapturedTipMessage @"检测到正在录屏，请确认是否是本人操作！"

#define kGetMessageCodeTitle @"获取验证码"
#define kRefreshGetMessageCodeTitle @"重新获取"

#define kMessageForArticleDeleted @"内容已被作者删除"

#define kMessageForTaskJumpFail @"跳转失败，请稍后重试"

#define kMessageTypeNews @"100100" //社区资讯
#define kMessageTypeActivity @"100200" //邻里活动
#define kMessageTypeIdleUsed @"100330" //闲置交换 二手
#define kMessageTypeGift @"100331" //赠送
#define kMessageTypeIdleLending @"100340" //闲置交换 出借
#define kMessageTypeBusiness @"100341" //小生意

#define kMessageTypeHomeService @"100888" //到家服务

#define kMessageTypeHelp @"102000" //帮帮审核通知
#define kMessageTypeTopicActivity @"102200" //专题活动 话题活动
#define kMessageTypePictorial @"101900" //画报（PGC内容）
#define kMessageTypePictorialPrize @"200000" //话题活动中奖通知
#define kMessageTypeUserCheck @"300000" //用户审核 跳转到”成员管理“页
#define kMessageTypeWashCarPaySuccess @"400001" //下单支付成功 设备启动，需要app刷新设备状态
#define kMessageTypeWashCarPayFailed @"400002" //设备启动失败，需要通知用户订单退款，需要重新下单启动
#define kMessageTypeUserFeedbackReply @"500000" //用户反馈回复编码
#define kMessageTypeShareGift @"shareGift" //分享有礼话费充值
#define kMessageTypeInvitationSuccess @"invitationSuccess" //分享有礼邀请成功一名邻居
#define kMessageTypeOwnerAuth @"C_PUSH_OWNER_AUTH" // 待业主审核的认证申请
#define kMessageTypeActivityTask @"C_PUSH_TYPE_TASK" // 活动 - 完成任务

#define kMessageTypeMsmart @"300003" //美的SDK
#define kMessageTypeLottery @"50001" //活动抽奖编码
#define kMessageTypeExpressCollection @"100500" //快递代收
#define kMessageTypeService @"100700" //物业服务
#define kMessageTypeBill @"101000" //费用缴纳
#define kMessageTypeOffLineActivityReview @"50003"//线下活动审核信息
#define kMessageTypeActivityDetail @"50004" // 活动详情
#define kMessageTypeQuestionnaire @"C_PUSH_TYPE_WJ"//新问卷详情

#define kMessageTypeCheckMonthCard @"B_PUSH_TYPE_CHARING_YKSH" //月卡审核通知
#define kMessageTypeMonthCardActiveRemind @"B_PUSH_TYPE_CARD_ACTIVE_REMIND"//月卡激活提醒
#define kMessageTypeMonthCardExpireRemind @"B_PUSH_TYPE_CARD_EXPIRE_REMIND" //月卡到期提醒
#define kMessageTypeAddCar @"B_PUSH_TYPE_CHARING_ADD_CAR"//新增车辆提醒

#define kMessageTypeHouseRentalAndSale @"C_LEASE_EXAMINE"//房屋租售消息
#define kMessageTypeCarRentalAndSale @"C_PARKING_EXAMINE"//车位租售消息


#define kMessageTypeWinningPublicActivity @"C_PUSH_NOTICE_PRIZE_ACTIVITY"//中奖公告type  活动
#define kMessageTypeWinningPublicTopic @"C_PUSH_NOTICE_PRIZE_TOPIC" //中奖公告type  话题

#define kMessageTypeWinningPublicIntegral @"C_PUSH_NOTICE_INTEGRAL" //中奖公告type  积分商城
#define kMessageTypeTopic @"C_PUSH_TOPIC" //话题
#define kMessageTypeIntegral @"C_PUSH_INTEGRAL" //积分商城
#define kMessageTypeNotice @"SEGI_OPEN_NOTICE" // 外部链接
#define kMessageTypePGC @"C_PUSH_PGC"//PGC

#define kMessageTypeNEIGHBORHOODMORE @"C_PUSH_NOTICE_NEIGHBORHOODMORE" //头条被推荐
#define kMessageTypeYOUZANOrder @"C_PUSH_YOUZAN" //有赞订单的消息推送

#define kMessageTypeINVITENEIGHBOR @"C_PUSH_INVITE_NEIGHBOR" //邀请邻居
#define kMessageTypeCUSTOM @"C_PUSH_CUSTOM" //自定义（跳转取turnType）
#define kMessageTypeNEIGHBORNEWS @"C_NEIGHBORHOOD_NEWS" //邻里圈有新动态 4.9.3新增


#define kMessageTypeMeetingRoomOrder @"90001" //订单取消提醒\订单开始提醒\订单结束提醒\退款成功提醒
#define kMessageTypeMeetingRoomOrderPayed @"90002" //支付成功提醒
#define kMessageTypeMeetingRoomOrderCancel @"90003" //订单支付提醒
#define kMessageTypeMeetingRoomOrderComment @"90004" //评价提醒
 
#define kMessageGroupLikePre @"LIKE" //点赞
#define kMessageGroupCommentPre @"COMMENT" //回复INVITE
#define kMessageGroupRadioPre @"RADIOTAG" //帮帮小助手
#define kMessageGroupSystemPre @"SYSTEM" //系统消息
#define kMessageGroupActivity @"ACTIVITYTAG" //活动通知消息
#define kMessageGroupServicePre @"fixedGroup" //服务号消息
#define kMessageGroupPrizePre @"PRIZE" // 中奖通知消息
#define kMessageGroupTaskPre @"PRIZE_TASK" // 活动任务中奖记录
#define kMessageGroupRadioReviewPre @"RADIOREVIEW" //帮帮审核通知
#define kMessageGroupRecommendPre @"SELECTIONRECOMMENDATIONTAG"//精选推荐
#define kMessageGroupMall @"SEGI_OPEN_NOTICE_GROUP"//商场通知  

//租赁列表一次取多少条
#define HOUSERENTAL_LIST_NUMBER 20


//手机号不对
#define kPhoneError @"您输入的手机号码有误，请重新输入"
// 「输入工具框提示文案」我想说......(140字)
#define KInputToolBarDefalutDesc [SEGBasicBussinessStringDefine inputToolBarDefalutDesc]
// 邻里圈发布&评论&活动评论的最大字数
#define kPostCommentMaxLength [SEGBasicBussinessStringDefine postCommentMaxLength]


#define kLoginMessage @"请登录后再试。"

#define WeakSelf __weak typeof(self) weakSelf = self;
#define StrongSelf __strong typeof(weakSelf) strongSelf = weakSelf;

#define STRING_SIZE_FONT(_width_, _string_, _fsize_) [_string_ boundingRectWithSize:CGSizeMake(_width_, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:_fsize_]} context:nil].size

#define kLoginMessage @"请登录后再试。"
#define kNoMoreDataContent @"没有更多数据啦"

#define CHECKVALUE(A) (A) != nil ? (A) : @""

#define kNoMoreDataMessage @"没有更多数据了！"

#define kTimeErrorToastMessage @"请选择最近的一个时间段"

// 招商微信回调关键字
#define kSpayWeiXinResponsekey @"SpayWeiXinResponsekey"
//使用了招商支付
#define kSpayWeiXinResponseMerchant @"SpayWeiXinResponseMerchant"
//使用原始支付
#define kpayWeiXinResponseUhome @"payWeiXinResponseUhome"

// 微信授权成功通知
#define kWeichatAuthSuccessNotification @"kWeichatAuthSuccessNotification"
// 园区快速登录未注册
#define kParkFastLoginNonRegister 31001
// 园区三方登录 账号已经绑定
#define kParkFastLoginAlreayBind 31002
// 园区密码登录失败提示语
#define kParkPasswordLoginFailTip @"账号或密码错误，请选择其他登录方式"
// 未安装微信提示语
#define kWecharNotInstallTip @"请安装微信"

/**
 工单控件布局宏
 */
#define HEADSPACE 15
#define TITLE_WIDTH 74
#define CONTENT_WIDTH 102
#define LINESPACE_6 6

#pragma mark 边距
#define LINEMARGIN_LEFT 0  //分割线边距
#define CONTENTMARGIN_LEFT 109 //内容左边距
#define CONTENTMARGIN_RIGHT 15 //内容右边边距
#define TEMPLATE_HEIGHT 44 //控件高度

//租赁列表一次取多少条
#define HOUSERENTAL_LIST_NUMBER 20


#define kSharedADPath [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"SEGAdCash.data"]

#define kOldSharedDataPath [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"SEGSharedTemplateEntryByCode.data"] //获取旧版分享模版

#define kAdListPath [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"SEGSharedAdList.data"] //广告

#define kSEGSharedTopLinePath [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"SEGSharedTopLine.data"] //广告

#define kAdListJumpPath [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"SEGSharedAdListJump.data"] //首页弹出广告

#define kQuizTypeList [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"SEGQuizTypeList.data"] //侧滑栏

#define kHotNewsPath [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"SEGHotNews.data"] //广告


#pragma mark - 腾讯广告 ---- 设置不同平台的GDTAppkey

#define kGDTAppkey [SEGBasicBussinessCommonDefine segGDTAppKey]
#define kGDTPosIdShareList @"5000558593863006" //首页纷享
#define kGDTPosIdPGCDetailExpressAdViewID @"3050832331543828" //PGC详情界面上的广告位
#define KGDTPosIdPGCDetailCommentID @"4071619031418955" //PGC详情的评论弹窗上的

#define KGDTPosIdTextTopicCommentID @"7051117041324141" //文字话题发布弹窗
#define KGDTPosIdNeighbourListCommentID @"4001914001913468" //邻里圈列表评论弹窗
#define KGDTPosIdNeighbourDetailCommentID @"4051703669096724" //UGC详情评论弹窗
#define KGDTPosIdActivityCommentListID @"7010443789215754" //活动-邻居说列表弹窗【4.9.10 被冻结】
#define KGDTPosIdActivityCommentDetailID @"2000746769913717" //活动-邻居说详情评论弹窗【4.9.10 被冻结】

#define kGDTPosIdChannelExpressAdViewID @"7090857553968222" //频道主站界面上的广告位

// 福利社
// 邻里圈,列表页,自渲染2.0
#define kGDTPosIdNeighbourList @"6071224186822546"
// 发布页,顶部,原生-纯图片
#define kGDTPosIdNeighbourPostTopPosition @"8021404919526347"
//日报详情页,观点说上方,自渲染2.0
#define kGDTPosIdSharedPGCDetailPositonTop @"1001027176328716"
//活动详情页,活动规则下方,Banner2.0-Banner图片
#define kGDTPosIdSharedActivityRules @"2091005999529574"
//图文话题详情页,列表页,原生-上图下文
#define kGDTPosIdSharedImageTextTopicList @"1061416230987050"
//消息中心,最后一个消息组的下方,自渲染2.0
#define kGDTPosIdMessageBottomCell @"7031507999121799"
//精选推荐、活动通知,列表页,自渲染2.0
#define kGDTPosIdMessageDetailList @"4091627186729702"
// Application Launch Tencent PlaceId
#define kGDTPosIdLaunch @"9020898213938692"
// 福利社,自渲染2.0
#define kGDTPosIdActivitySign @"8001228146420451"


#pragma mark - 极光推送 ---- 设置不同平台的极光推送appkey
#define kJPUSHAppTestKey [SEGBasicBussinessCommonDefine segJPUSHAppTestKey] //测试账号的极光key
#define kJPUSHAppKey [SEGBasicBussinessCommonDefine segJPUSHAppKey]//正式账号的极光key 上架用
#define kJPUSHChannel @"Publish channel"

#pragma mark - QQ appId、appKey
#define kQQAppId [SEGBasicBussinessCommonDefine segQQAppId]
#define kQQAppKey [SEGBasicBussinessCommonDefine segQQAppKey]

#pragma mark - 微信 appkey
#define kWeChatAppId [SEGBasicBussinessCommonDefine segWeChatAppId]
#define kUniversalLink [SEGBasicBussinessCommonDefine segUniversalLink]
#pragma mark - 友盟统计 appkey
#define kUMengAnalyticsAppKey [SEGBasicBussinessCommonDefine segUMengAnalyticsAppKey]

#pragma mark - 百度地图 appkey
#define kBaiduMapAppKey [SEGBasicBussinessCommonDefine segBaiduMapAppKey]

#pragma mark - 有赞商城 client_id、client_secret
#define kYouZanClient_id @"29f2fe3c87f30aa332"//[SEGBasicBussinessCommonDefine segYouZanClient_id]
#define kYouZanClient_secret @"e8f45ca30d2fd16bda2e87a863cbae7d"//[SEGBasicBussinessCommonDefine segYouZanClient_secret]

/****************************************跳转********************************************/

@interface SEGBasicBussinessCommonDefine : NSObject
/**
 * 设置不同平台的有赞商城client_id
 * @author Wendy
 */
+(NSString*)segYouZanClient_id;
/**
 * 设置不同平台的有赞商城client_secret
 * @author Wendy
 */
+(NSString*)segYouZanClient_secret;

/**
 * 设置不同平台的百度地图服务密钥appkey
 * @author Wendy
 */
+(NSString*)segBaiduMapAppKey;

/**
 * 设置不同平台的友盟统计appkey
 * @author Sam
 */
+(NSString*)segUMengAnalyticsAppKey;

/**
 * 设置不同平台的QQ分享appID
 * @author helen
 */
+(NSString*)segQQAppId;
/**
 * 设置不同平台的QQ分享appKey
 * @author helen
 */
+(NSString*)segQQAppKey;

/**
 * 设置不同平台的微信分享appkey
 * @author helen
 */
+(NSString*)segWeChatAppId;

/**
 * 设置不同平台UniversalLink
 * @author helen
 */
+(NSString*)segUniversalLink;

/**
 * 设置不同平台的GDTAppKey
 * @author Helen
 */
+(NSString *)segGDTAppKey;

/**
 * 设置不同平台的测试极光推送appkey
 * @author helen
 */
+(NSString*)segJPUSHAppTestKey;
/**
 * 设置不同平台的极光推送appkey  (上架用正式key)
 * @author helen
 */
+(NSString*)segJPUSHAppKey;

+(BOOL)segDebug;

@end


/// 基础业务提示定义
@interface SEGBasicBussinessStringDefine : NSObject

/// 输入框默认文案
+ (NSString *)inputToolBarDefalutDesc;

/// 邻里圈发布&评论&活动评论的最大字数
+ (NSInteger)postCommentMaxLength;

/// 提示用户认证的文案
@property (nonatomic, strong, class) NSString *promptUserAuthentication;

@end
